package com.zretc.dao;

import com.zretc.entity.Cinema;
import com.zretc.entity.Movie;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author qiaozhiyu
 * @date 2020-7-25
 */
@Repository
public interface CinemaBackMapper {

    /**
     * 按照影院名字查询影院下面的所有电影
     * @param cinemaName
     * @return
     */
    List<Cinema> findMovieByCinemaName(String cinemaName);

    /**
     * 查询所有影院
     * @return
     */
    List<Cinema> findCinema();

    /**
     * 通过电影院名查询电影id
     * @param cinemaName
     * @return
     */
    List<Map<String,String>> findMovieIdByCinemaName(String cinemaName);

    /**
     * 通过影院名和电影名查询该影院下的电影
     * @param params
     * @return
     * @Param(value = "cinemaName")String cinemaName, @Param(value = "movieName")String movieName
     *
     */
    List<Movie> findMovieByCinemaAndMovieName(Map<String,String> params);
}
